﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

public partial class LTILoader : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Request.QueryString["ProviderURL"] != null)
            LTI.XMLUrl = Request.QueryString["ProviderURL"];
        if (Request.QueryString["CourseID"] != null)
            LTI.CourseID = Request.QueryString["CourseID"];
        if (Request.QueryString["CourseName"] != null)
            LTI.CourseName = Request.QueryString["CourseName"];
        if (Request.QueryString["ResourceID"] != null)
            LTI.TPResourceID = Request.QueryString["ResourceID"];
        if (Request.QueryString["SharedSecret"] != null)
            LTI.SharedSecret = Request.QueryString["SharedSecret"];
        if (Request.QueryString["ToolID"] != null)
            LTI.ToolID = Request.QueryString["ToolID"];
        if(Request.QueryString["Signature"] != null)
            LTI.Signature = Guid.NewGuid().ToString();
        if (Request.QueryString["Key"] != null)
            LTI.Key = Request.QueryString["Key"];
        if (Request.QueryString["LtiType"] != null)
            LTI.LtiType = Request.QueryString["LtiType"];

        /*
        if (Request.QueryString["ProviderURL"] != null)
            lblTest.Text += Request.QueryString["ProviderURL"] + "<br>";
        if (Request.QueryString["CourseID"] != null)
            lblTest.Text += Request.QueryString["CourseID"] + "<br>";
        if (Request.QueryString["CourseName"] != null)
            lblTest.Text += Request.QueryString["CourseName"] + "<br>";
        if (Request.QueryString["ResourceID"] != null)
            lblTest.Text += Request.QueryString["ResourceID"] + "<br>";
        if (Request.QueryString["SharedSecret"] != null)
            lblTest.Text += Request.QueryString["SharedSecret"] + "<br>";
        */
    }
}
